package com.weibo.net;

import javax.crypto.spec.SecretKeySpec;

public class Token
{
  protected String mOauth_Token_Secret;
  private String mOauth_verifier;
  protected SecretKeySpec mSecretKeySpec;
  private String mToken = "";
  protected String[] responseStr;

  public Token()
  {
    this.mOauth_verifier = "";
    this.mOauth_Token_Secret = "";
    this.responseStr = null;
  }

  public Token(String paramString)
  {
    this.mOauth_verifier = "";
    this.mOauth_Token_Secret = "";
    this.responseStr = null;
    this.responseStr = paramString.split("&");
    this.mOauth_Token_Secret = getParameter("oauth_token_secret");
    this.mToken = getParameter("oauth_token");
  }

  public Token(String paramString1, String paramString2)
  {
    this.mOauth_verifier = "";
    this.mOauth_Token_Secret = "";
    this.responseStr = null;
    this.mToken = paramString1;
    this.mOauth_Token_Secret = paramString2;
  }

  public String getParameter(String paramString)
  {
    String str1 = null;
    String[] arrayOfString = this.responseStr;
    int i = arrayOfString.length;
    int j = 0;
    while (true)
    {
      if (j >= i);
      while (true)
      {
        return str1;
        String str2 = arrayOfString[j];
        if (!(str2.startsWith(paramString + '=')))
          break;
        str1 = str2.split("=")[1].trim();
      }
      ++j;
    }
  }

  public String getSecret()
  {
    return this.mOauth_Token_Secret;
  }

  protected SecretKeySpec getSecretKeySpec()
  {
    return this.mSecretKeySpec;
  }

  public String getToken()
  {
    return this.mToken;
  }

  public String getVerifier()
  {
    return this.mOauth_verifier;
  }

  protected void setSecretKeySpec(SecretKeySpec paramSecretKeySpec)
  {
    this.mSecretKeySpec = paramSecretKeySpec;
  }

  public void setVerifier(String paramString)
  {
    this.mOauth_verifier = paramString;
  }
}